package red.service.impl;


import red.mapper.Usermapper;
import red.model.UserModel;
import red.service.UserService;
import red.util.Model;

import java.util.List;
import java.util.UUID;

public class UserServiceImpl implements UserService {

    @Override
    public UserModel addUser(Model model, Usermapper usermapper) {
            String user_name=(String) model.get("user_name");
            String password=(String) model.get("password");
            UserModel userModel=new UserModel();
            userModel.setUser_name(user_name);
            userModel.setPassword(password);
            userModel.setUser_id(UUID.randomUUID().toString());
            usermapper.addUser(userModel);
            return userModel;
    }

    @Override
    public List<UserModel> getuser() {
        return null;
    }
}
